package com.guchenbo.example;

import com.alibaba.fastjson.annotation.JSONField;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by CreGu on 2016/6/9.
 */
public class Person implements Cloneable {

    public String name;
    @JSONField(name = "assets_cun_jin_bao")
    public Integer age;
    public Date birthday;

    public Person() {
    }

    public Person(String name, int age, Date birthday) {
        this.name = name;
        this.age = age;
        this.birthday = birthday;
    }

    @Override
    public Person clone() {
        Person p = null;
        try {
            p = (Person) super.clone();
            return p;
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return p;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public static Person person(){
        return new Person("Jim", 18, new Date());
    }
    public static List<Person> persons(){
        List<Person> persons = new ArrayList<>();
        persons.add(new Person("Jim", 18, new Date()));
        persons.add(new Person("Jim2", 18, new Date()));
        persons.add(new Person("Jim3", 18, new Date()));
        return persons;
    }
}
